package cz.cvut.manatee.processManager;

import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;


public class TestingClientRMI {
    public static void makeQuery(String corpusName, String CQL) {
        if (System.getSecurityManager() == null) {
            System.setSecurityManager(new SecurityManager());
        }
        try {
            String name = "ManateeQuery";
            Registry registry = LocateRegistry.getRegistry();
            QueryRMI remote = (QueryRMI) registry.lookup(name);
            Result result = remote.Concordance(corpusName, CQL, 1, "15#", "15#", "word", "word", "s", "#", 100, false);
            
            System.out.println(result+"\nKlient: to je vse.");
            
        } catch (Exception e) {
            System.err.println("Vyjimka v klientu:");
            e.printStackTrace();
        }
    }
}
